import { request } from '@/network/http.js'
export const login = p => request('post', '/back/admin/login', p) // 后台登录
export const getMenus = p => request('post', '/back/admin/getMenus', p, true, false) // 获取权限树以及个人信息
// ==============系统管理====================
// 权限管理
export const getAuthList = p => request('post', '/back/menu/getAuthList', p, true, false) // 获取权限列表
export const getAuthOnly = p => request('post', '/back/menu/getAuthOnly', p, true, false) // 获取单个权限
export const editAuth = p => request('post', '/back/menu/editAuth', p) // 编辑权限
export const addAuth = p => request('post', '/back/menu/addAuth', p) // 添加权限
export const delAuth = p => request('post', '/back/menu/delAuth', p) // 删除权限
// 超管左侧菜单管理
export const getMenuList = p => request('post', '/back/menu/getMenuList', p, true, false) // 获取菜单列表
export const editMenu = p => request('post', '/back/menu/editMenu', p) // 编辑超管左侧菜单
// 角色管理
export const getRoleList = p => request('post', '/back/role/getRoleList', p, true, false) // 获取角色列表
export const getAdminAuth = p => request('post', '/back/menu/getAdminAuth', p, true, false) // 获取当前管理员权限
export const getRoleOnly = p => request('post', '/back/role/getRoleOnly', p, true, false) // 获取单个角色信息
export const getRoleMenuOnly = p => request('post', '/back/role/getRoleMenuOnly', p, true, false) // 获取单个角色菜单信息
export const addRole = p => request('post', '/back/role/addRole', p) // 添加角色
export const changeRoleStatus = p => request('post', '/back/role/changeRoleStatus', p) // 修改角色状态
export const delRole = p => request('post', '/back/role/delRole', p) // 删除角色
export const editRole = p => request('post', '/back/role/editRole', p) // 编辑角色信息
export const editRoleMenu = p => request('post', '/back/role/editRoleMenu', p) // 编辑角色菜单信息
// 管理员管理
export const getAdminList = p => request('post', '/back/admin/getAdminList', p, true, false) // 获取管理员列表
export const getAdminRole = p => request('post', '/back/role/getAdminRole', p, true, false) // 获取当前管理员下级角色
export const addAdmin = p => request('post', '/back/admin/addAdmin', p) // 添加管理员
export const changeAdminStatus = p => request('post', '/back/admin/changeAdminStatus', p) // 修改管理员状态
export const getAdminOnly = p => request('post', '/back/admin/getAdminOnly', p, true, false) // 获取单个管理员信息
export const delAdmin = p => request('post', '/back/admin/delAdmin', p) // 删除管理员
export const editAdmin = p => request('post', '/back/admin/editAdmin', p) // 编辑管理信息
export const forceAdminPwd = p => request('post', '/back/admin/forceAdminPwd', p) // 强制修改管理员密码
// 商品单位管理
export const getGoodsUnitList = p => request('post', '/back/goodsUnits/list', p, true, false) // 获取列表
export const addGoodsUnit = p => request('post', '/back/goodsUnits/add', p) // 添加商品单位
export const getGoodsUnitOnly = p => request('post', '/back/goodsUnits/getOnly', p, true, false) // 获取单个商品单位信息
export const delGoodsUnit = p => request('post', '/back/goodsUnits/del', p) // 删除商品单位
export const editGoodsUnit = p => request('post', '/back/goodsUnits/edit', p) // 编辑商品单位
// 返比设置
export const getPercent = p => request('post', '/back/admin/getPercent', p, true, false) // 获取反比
export const editPercent = p => request('post', '/back/admin/editPercent', p) // 编辑返比
// 下单时间段
export const getOrderTime = p => request('post', '/back/admin/getOrderTime', p, true, false) // 获取下单时间段
export const editOrderTime = p => request('post', '/back/admin/editOrderTime', p) // 编辑下单时间段
export const addOrderTime = p => request('post', '/back/admin/addOrderTime', p) // 添加下单时间段
export const delOrderTime = p => request('post', '/back/admin/delOrderTime', p) // 删除下单时间段
// ==============轮播图管理====================
// 轮播图管理
export const getBannerList = p => request('post', '/back/banner/lst', p, true, false) // 获取轮播图列表
export const addBanner = p => request('post', '/back/banner/add', p, true, true, 'pic') // 添加轮播图
export const getBannerOnly = p => request('post', '/back/banner/getOnly', p, true, false) // 获取单个轮播图信息
export const changeBannerStatus = p => request('post', '/back/banner/changeStatus', p) // 修改轮播图状态
export const delBanner = p => request('post', '/back/banner/delete', p) // 删除轮播图
export const editBanner = p => request('post', '/back/banner/edit', p, true, true, 'pic') // 编辑轮播图
// ==============分拣中心管理====================
// 分拣中心管理
export const getOrgList = p => request('post', '/back/org/getOrgList', p, true, false) // 获取分拣中心列表
export const getOrgOnly = p => request('post', '/back/org/getOrgOnly', p, true, false) // 获取单个分拣中心信息
export const addOrg = p => request('post', '/back/org/addOrg', p) // 添加分拣中心
export const changeOrgStatus = p => request('post', '/back/org/changeOrgStatus', p) // 修改分拣中心状态
export const delOrg = p => request('post', '/back/org/delOrg', p) // 删除分拣中心
export const editOrg = p => request('post', '/back/org/editOrg', p) // 编辑分拣中心
// ==============商品管理====================
// 商品分类管理
export const lstFirAndSec = p => request('post', '/back/category/lstFirAndSec', p, true, false) // 获取一二级分类列表以及模板
export const getCateList = p => request('post', '/back/category/lst', p, true, false) // 获取分类列表
export const addCate = p => request('post', '/back/category/add', p, true, true, 'pic') // 添加分类
export const getCateOnly = p => request('post', '/back/category/getOnly', p, true, false) // 获取单个分类信息
export const delCate = p => request('post', '/back/category/delete', p) // 删除分类
export const changeCateStatus = p => request('post', '/back/category/changeStatus', p) // 修改分类状态
export const editCate = p => request('post', '/back/category/edit', p, true, true, 'pic') // 编辑分类
// 商品管理
export const getGoodsOther = p => request('post', '/back/goods/getOther', p, true, false) // 获取添加编辑额外信息
export const addGoods = p => request('post', '/back/goods/add', p) // 添加商品
export const getGoodsList = p => request('post', '/back/goods/list', p, true, false) // 获取商品列表
export const getCategorySimpleList = p => request('post', '/back/goods/getCategorySimpleList', p, false, false) // 获取搜索分类列表
export const changeGoodsStatus = p => request('post', '/back/goods/changeStatus', p) // 修改商品状态
export const changeGoodsIsStatus = p => request('post', '/back/goods/changeIsStatus', p) // 修改商品热卖|新品|优品推荐状态
export const delGoods = p => request('post', '/back/goods/del', p) // 删除商品
export const getGoodsOnly = p => request('post', '/back/goods/getOnly', p, true, false) // 获取商品单个信息
export const editGoods = p => request('post', '/back/goods/edit', p) // 编辑商品
export const getGoodsDesc = p => request('post', '/back/goods/getDesc', p) // 获取商品详情
export const editGoodsDesc = p => request('post', '/back/goods/editDesc', p) // 编辑商品详情
export const getLogList = p => request('post', '/back/goods/getLogList', p) // 查看出库入库报损记录
// 商品销售统计
export const getGoodsTotalList = p => request('post', '/back/data/getGoodsTotalList', p, true, false) // 获取商品销售统计
export const getGoodsTotalExcel = p => request('post', '/back/data/getGoodsTotalExcel', p, true, false) // 导出商品销售统计excel
// 商品入库统计
export const goodsInList = p => request('post', '/back/goods/goodsInList', p, true, false) // 获取商品入库记录
export const goodsInExcel = p => request('post', '/back/goods/goodsInExcel', p, true, false) // 导出商品入库excel
// ==============公司|老板管理====================
// 老板管理
export const getBossList = p => request('post', '/back/user/getBossList', p, true, false) // 获取老板列表
export const checkBoss = p => request('post', '/back/user/checkBoss', p) // 审核老板
export const changeBossStatus = p => request('post', '/back/user/changeBossStatus', p) // 修改老板状态
export const agentMakeOrder = p => request('post', '/back/user/agentMakeOrder', p) // 代理下单
export const getAddressSimple = p => request('post', '/back/user/getAddressSimple', p) // 获取公司地址列表
// 公司管理
export const getCompanylist = p => request('post', '/back/company/list', p, true, false) // 获取公司列表
export const believeCompany = p => request('post', '/back/company/believe', p) // 授信公司
export const getCompanyDriver = p => request('post', '/back/company/getAdmin', p) // 获取有效的管理员列表
export const bindCompanyDriver = p => request('post', '/back/company/bindDriver', p) // 绑定司机
export const unbindCompanyDriver = p => request('post', '/back/company/unbindDriver', p) // 解绑司机
export const getCompanyCenter = p => request('post', '/back/company/getCenter', p) // 获取有效分拣中心列表以及当前绑定的分拣中心
export const editCompanyCenter = p => request('post', '/back/company/editCenter', p) // 编辑分拣中心
// ==============订单相关管理====================
// 订单管理
export const getOrderList = p => request('post', '/back/order/list', p, true, false) // 获取订单列表
export const getOrderLogList = p => request('post', '/back/order/getOrderLogList', p, true, false) // 获取订单日志
export const backMoney = p => request('post', '/back/order/backMoney', p) // 受理退款
export const getDrawList = p => request('post', '/back/order/getDrawList', p, true, false) // 获取划账|结算列表
export const drawOrder = p => request('post', '/back/order/drawOrder', p) // 划账|结算订单
export const getDrawLogList = p => request('post', '/back/order/getDrawLogList', p, true, false) // 获取划账|结算记录
// 订单评价
export const getGoodsReplyList = p => request('post', '/back/goodsReply/list', p, true, false) // 获取订单评价列表
export const goodsReplyBack = p => request('post', '/back/goodsReply/back', p) // 操作人员回复评价
export const changeGoodsReplyStatus = p => request('post', '/back/goodsReply/changeStatus', p) // 修改评价是否显示
// 主订单管理
export const getMasterOrderList = p => request('post', '/back/order/getMasterList', p, true, false) // 获取主订单列表
export const outMasterExcel = p => request('post', '/back/order/outExcel', p) // 主订单导出excel
// ==============数据统计管理====================
// 数据统计
export const getCompanyDrawList = p => request('post', '/back/order/getCompanyDrawList', p, true, false) // 支付通道获取划账列表
export const getAgentDrawList = p => request('post', '/back/order/getAgentDrawList', p, true, false) // 代理商获取划账列表
export const getDataTotalList = p => request('post', '/back/data/getTotalList', p, true, false) // 获取数据统计
// 下单统计
export const getStatisticsList = p => request('post', '/back/order/getStatisticsList', p, true, false) // 获取下单统计列表
export const statisticsExcel = p => request('post', '/back/order/statisticsExcel', p, true, false) // 下载下单统计
